<?php
namespace app\index\controller;
use think\Controller;
use think\Request;
use think\Db;
use app\common\model\Article;
class IndexController extends Controller
{
    public function index(Article $article,Request $request)
    {   $where =[];
        $p= intval($request->page);
        $id = intval(input('get.id'));
        if($id){
            $where['a.c_id'] = $id;
        }
        $article_list = $article->article_list($where,$p);
        $this->assign('list',$article_list);
        return view();
    }



}
